title

H. Sherry Zhang

Numbat seminar 2023

Oct 12, 2023

Indexes

A class of drought indexes

Pipeline envisaged

The pipeline design (9 modules)

data with spatial (\(\mathbf{s}\)) and temporal (\(\mathbf{t}\)) dimensions: \[x(\mathbf{s};\mathbf{t})\]

  • Temporal processing: \(f_{\mathcal{\psi}}(x(\mathbf{s};\mathbf{t}))\)
  • Spatial processing: \(g_{\mathcal{\theta}}(x(\mathbf{s};\mathbf{t}))\)


  • Variable transformation: \(h_{\tau}(x(\mathbf{s};\mathbf{t}))\)
  • Scaling: \([x(\mathbf{s};\mathbf{t})- \alpha]/\gamma\)
  • Normalising: \(\Phi^{-1}[x(\mathbf{s}; \mathbf{t})]\)
  • Distribution fit: \(F_{\eta}(x(\mathbf{s}; \mathbf{t}))\)

  • Benchmarking: \(u[x(\mathbf{s};\mathbf{t})]\)

  • Dimension reduction

\[\begin{equation} x_{p^*}(\mathbf{s}; \mathbf{t}) \rightarrow x_p(\mathbf{s}; \mathbf{t}) \end{equation}\]
  • Simplification
\[\begin{equation} \begin{cases} C_0 & c_1 \leq x(\mathbf{s};\mathbf{t}) < c_0 \\ C_1 & c_2 \leq x(\mathbf{s};\mathbf{t}) < c_1 \\ \cdots \\ C_z & c_z \leq x(\mathbf{s};\mathbf{t}) \end{cases} \end{equation}\]

Pipeline for two drought indexes

idx_spi <- function(.scale, .dist, ...){
  ...
  data |>                            # data contain `prcp`
    aggregate(.var = prcp,            # step 1: temporal aggregation
              .scale = .scale)|>     #         aggregate `prcp` with time scale    
                                      #         `.scale` to create `.agg`, by default
    dist_fit(.dist = .dist,           # step 2: distribution fit
             .method = "lmoms",       #         using L-moment to fit `.dist`
             .var = .agg) |>         #         distribution on `.agg`
    augment(.var = .agg)              # step 3: normalising 
                                      #         find the normal density for `.agg`
}
idx_spei <- function(.scale, .dist, ...){
  ...
  data |>                                  # data contain `tavg` and `prcp`
    var_trans(                              # step 1: variable transformation
      .method = "thornthwaite",             #         using the thornthwaite function
      .vars = tavg, .new_name = "pet") |>  #         on `tavg` to create `pet`
    dim_red(diff = prcp - pet) |>          # step 2: dimension reduction 
    aggregate(                              # step 3: temporal aggregation
      .var = diff,                          #         aggregate `diff` with time scale
      .scale = .scale) |>                  #         `.scale` to create `.agg`
    dist_fit(                               # step 4: distribution fit
      .dist = .dist, .method = "lmoms",     #         using L-moment to fit `.dist`
      .var = .agg) |>                      #         distribution on `.agg`
    augment(.var = .agg)                    # step 5: normalising 
                                            #         find the normal density for `.agg`
}

Example

.scale <- c(6, 12, 24, 36)
(idx <- queensland |> 
  init(id = id, time = ym) |> 
  compute_indexes(
    spei = idx_spei(
      .pet_method = "thornthwaite", .tavg = tavg, .lat = lat,
      .scale = .scale, .dist = c(gev(), loglogistic())),
    spi = idx_spi(.scale = .scale)
  ))

2010 Queensland flood & 2019-20 Australia drought

All time scales agree on an extreme drought in 2019-20 bushfire season

Summary

  • In this example, we compared two indexes (SPI and SPEI) across time (monthly from 1990 Jan to 2022 Apr) and space (29 stations in Queensland, Australia) under different index configurations (different time scales: 6, 12, 24, 36; and distribution: GEV and log logistic).

What you can expect an index pipeline to do :

  • don’t like the particular dimension reduction method used to combine variables? swap it with different expression(s)!

  • want to know the uncertainty associated with the SPI/ SPEI? bootstrap on the aggregated values before fitting the distribution!

Reference

Slides created via quarto available at

https://sherry-numbat2023.netlify.app/


tidyindex package: https://github.com/huizezhang-sherry/tidyindex